/*
 * !Drowning
 * May 29, 2011
 * TCSS 360
 * Schedule Project
 */
/**
 * Preference object that holds the preferred course ID,
 * the days, the start time, and the end time.
 * 
 * @author David Phillips (modified by Jay Fernandez)
 * @version May 31, 2011
 */
public class preference {

	/**
	 * The course ID.
	 */
	private String my_id;
	
	/**
	 * The days.
	 */
	private String my_day;
	
	/**
	 * The starting time.
	 */
	private int my_start_time;
	
	/**
	 * The end time.
	 */
	private int my_end_time;
	
	/**
	 * Constructor that initializes from a given course ID.
	 * 
	 * @param id The course ID.
	 */
	public preference(String id) {
		this(id, "", 0, 0);
	}
	
	/**
	 * Constructor that initializes from a given course ID,
	 * days, start time, and end time.
	 * 
	 * @param id The course ID.
	 * @param day The days.
	 * @param startTime The start time.
	 * @param endTime The end time.
	 */
	public preference(String id, String day, int startTime, int endTime) {
		my_id = id;
		my_start_time = startTime;
		my_end_time = endTime;
		my_day = day;
	}

	/**
	 * @return the course ID.
	 */
	public String getCourseId() {
		return my_id;
	}
	
	/**
	 * @return the days.
	 */
	public String getDay() {
		return my_day;
	}

	/**
	 * @return the start time.
	 */
	public int getStartTime() {
		return my_start_time;
	}
	
	/**
	 * @return the end time.
	 */
	public int getEndTime() {
		return my_end_time;
	}
	public String toString() {
		String result;
		result = "Course ID: " + my_id;
		result = result + " Days: " + my_day;
		result = result + " Start Time: " + my_start_time;
		result = result + " End Time: " + my_end_time;
		return result;
	}
}
